'''
	公共的文件
'''

INTEGER = 'INTEGER' 	# 1 整数
FLOAT = 'FLOAT'  		# 1.5 浮点数
STRING='STRING';		# 字符串类型
BOOLEAN='BOOLEAN';		# 布尔类型

# ============= start 算术运算符 =========== #

PLUS='PLUS';			# + 加号
MINUS='MINUS';			# - 减号
MUL='MUL';				# * 乘号
DIV='DIV';				# / 除号

# ============= end 算术运算符 =========== #

DOUBLE_QUOTES='DOUBLE_QUOTES';		# " 双引号
SINGLE_QUOTES='SINGLE_QUOTES';		# ' 单引号
LPAREN='LPAREN';					# ( 左括号
RPAREN='RPAREN';					# ) 右括号
LEFT_RPAREN='LEFT_RPAREN';			# { 左大括号
RIGHT_RPAREN='RIGHT_RPAREN';		# } 右大括号

COMMA='COMMA';						# , 逗号
SEMI='SEMI';						# ; 分号

# ============= start 赋值运算符 =========== #

ASSIGN='ASSIGN';				# = 等号
PLUS_ASSIGN='PLUS_ASSIGN';		# += 加等
MINUS_ASSIGN='MINUS_ASSIGN';	# -= 减等
MUL_ASSIGN='MUL_ASSIGN';		# *= 乘等
DIV_ASSIGN='DIV_ASSIGN';		# /= 除等

# ============= end 赋值运算符 =========== #

# ============= start 比较运算符 =========== #

EQUAL='EQUAL';								# == 等于
NOTEQUAL='NOTEQUAL';						# != 不等于
GREATER_THAN='GREATER_THAN';				# > 大于
LESS_THAN='LESS_THAN';						# < 小于
GREATER_THAN_EQUAL='GREATER_THAN_EQUAL';	# > 大于等于
LESS_THAN_EQUAL='LESS_THAN_EQUAL';			# < 小于等于

# ============= end 比较运算符 =========== #

# ============= start 比较运算符 =========== #

AND='AND';				# and && 逻辑与
OR='OR';				# or || 逻辑或
NOT='NOT';				# not ! 逻辑非

# ============= end 比较运算符 =========== #



IMPORT='IMPORT';		# 导入文件

VAR='VAR'				# 声名变量
VARIABLE='VARIABLE';	# 变量

IF='IF';				# if
THEN='THEN';			# then
ELSE='ELSE';			# else
FUNCTION='FUNCTION';	# function



EOF='EOF';			 	# 结束符号


def echo(value):
	print("\n");
	print('============= start 打印输出 ==============')
	print("\n");
	print(value);
	print("\n");
	print('============= end 打印输出   ==============')
	print("\n");

#判断变量类型的函数
def typeof(variate):
	type=None
	if isinstance(variate,int):
		type = "int"
	elif isinstance(variate,str):
		type = "str"
	elif isinstance(variate,float):
		type = "float"
	elif isinstance(variate,list):
		type = "list"
	elif isinstance(variate,tuple):
		type = "tuple"
	elif isinstance(variate,dict):
		type = "dict"
	elif isinstance(variate,set):
		type = "set"
	return type



